package com.cj;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author cc
 * @date 2025-05-14 09:03
 **/

public class Demo01 {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
        User user = ctx.getBean(User.class);
        System.out.println("user = " + user);


        DataSource bean = ctx.getBean(DataSource.class);
        System.out.println("bean = " + bean);
    }
}
